package com.example.objectPool;

/**
 * 对象池模式
 */
public class Test {
    public static void main(String[] args) throws InterruptedException {
        DataConnectionPool dataConnectionPool = new DataConnectionPool(3);

        dataConnectionPool.intializePool();

        DataConnection connection = dataConnectionPool.getConnection();

        connection.executeQuery("select * from person");

        connection.close();

        dataConnectionPool.releaseConnection(connection);
    }
}
